package com.assa.jco.dataprovider;

import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

import com.sap.conn.jco.ext.DestinationDataEventListener;
import com.sap.conn.jco.ext.ServerDataEventListener;

public class JcoDataProviderSpringAware implements DataProvider {
	
	private Map<String, Properties> destinationProperties = new HashMap<String, Properties>();
	public void setDestinationProperties(Map<String, Properties> destinationProperties) {
		this.destinationProperties = destinationProperties;
	}

	public void setServerProperties(Map<String, Properties> serverProperties) {
		this.serverProperties = serverProperties;
	}

	private Map<String, Properties> serverProperties = new HashMap<String, Properties>();	
	private DestinationDataEventListener destionationDataEventListener;
	private ServerDataEventListener serverDataEventListener;
	
	public Properties getDestinationProperties(String destination) {
		return this.destinationProperties.get(destination);
	}

	public void setDestinationDataEventListener(DestinationDataEventListener listener) {
		this.destionationDataEventListener = listener;
	}

	public boolean supportsEvents() {
		return true;
	}

	public Properties getServerProperties(String server) {
		return this.serverProperties.get(server);
	}

	public void setServerDataEventListener(ServerDataEventListener listener) {
		this.serverDataEventListener = listener;
	}

}
